package com.itheima.stock.mapper;

import com.itheima.stock.pojo.SysRole;
import com.itheima.stock.pojo.SysUser;
import com.itheima.stock.pojo.SysUserRole;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author hyn
* @description 针对表【sys_user_role(用户角色表)】的数据库操作Mapper
* @createDate 2022-05-30 01:02:49
* @Entity com.itheima.stock.pojo.SysUserRole
*/
@Repository
public interface SysUserRoleMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysUserRole record);

    int insertSelective(SysUserRole record);

    SysUserRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysUserRole record);

    int updateByPrimaryKey(SysUserRole record);

    @Delete("delete from sys_user_role where user_id =#{uid}")
    boolean deleteByUserId(@Param("uid") long id);

    List<SysRole> selectByUserPrimaryKey(@Param("uid") String id);
}
